package com.wakey.rtcs.web.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.wakey.rtcs.web.model.User;

public interface UserMapper {

	/**
	 * 
	 * @param userId
	 * @return
	 */
	User queryById(@Param("userId")String userId);
	
	/**
	 * 
	 * @param userName
	 * @param userPassword
	 * @return
	 */
	User queryByLogin(@Param("userName")String userName, @Param("userPassword")String userPassword);
	
	/**
	 * 
	 * @return
	 */
	List<User> queryAll(User user);
	
	/**
	 * 
	 * @param userId
	 * @param userName
	 * @return
	 */
	int insertUser(@Param("userId")String userId, @Param("userName")String userName, @Param("userPassword")String userPassword);
	
	int addUser(@Param("name")String userName,@Param("password")String password,@Param("type")int userType,@Param("email")String email,@Param("nickName")String nickName);
	/**
	 * 
	 * @param userId
	 * @return
	 */
	int deleteUser(String[] idArray);

	Object makeOld(@Param("id")Long id);

	int updateUser(@Param("id")Long id, @Param("password")String password);

	int forgetPassword(@Param("userName")String userName, @Param("email")String email, @Param("password")String password);

	int addUserObj(User user);

	User queryById(@Param("id")Long id);

	int editUser(User user);

}
